package br.com.musclebook.error;

import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerFactory;

public class MusclebookExceptionHandlerFactory extends ExceptionHandlerFactory {

    private ExceptionHandlerFactory wrapped;

    public MusclebookExceptionHandlerFactory(ExceptionHandlerFactory factory) {
	this.wrapped = factory;
    }

    @Override
    public ExceptionHandler getExceptionHandler() {
	return new MuscleBookExceptionHandler(wrapped.getExceptionHandler());
    }

    @Override
    public ExceptionHandlerFactory getWrapped() {
	return wrapped;
    }

}
